<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="m@markzou.com">
    <link rel="shortcut icon" href="favicon.png">
    <title>${(jshopbasicinfo.jshopname)}</title>
    <#if (jshopbasicinfo.metaKeywords)! != "">
        <meta name="keywords" content="${jshopbasicinfo.metaKeywords}"/>
    </#if>
    <#if (jshopbasicinfo.metaDes)! != "">
        <meta name="description" content="${jshopbasicinfo.metaDes}"/>
    </#if>
    <!-- fav icons -->
    <link rel="shortcut icon" href="${basepath}/ui/assets/img/favicon.png" />

    <link rel="stylesheet" type="text/css" href="${basepath}/ui/assets/css/inc_default_theme.css">
    <link rel="stylesheet" type="text/css" href="${basepath}/ui/assets/css/bootstrap.css">

    <script src="${basepath}/ui/assets/js/bootstrap.min.js"></script>
    <script src="${basepath}/ui/assets/js/jquery-1.7.2.min.js"></script>

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="${basepath}/ui/assets/js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respipond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="${basepath}/ui/assets/js/html5shiv.js"></script>
      <script src="${basepath}/ui/assets/js/respond.min.js"></script>
    <![endif]-->
 <script src="${basepath}/ui/js/mycartinput.js"></script>



</head>


<body>
<div class="container-fluid nopadding">
    <div class="page_content_orderpage">
    	<div class="pc_head">
	    	      	<!-- 头部开始 -->
					<#include "/WEB-INF/theme/default/shop/header.ftl">
					<!--导航条-->
					<#include "/WEB-INF/theme/default/shop/mainnavigation.ftl">
     	</div>

<!--body-->
        <div class="pc_body">
            <div class="pc_w1200">

                <div class="pc_mod">

                    <div class="cart_main">
                        <div class="cm_t"><img src="${basepath}/ui/assets/img/icons/cart.png" alt=""/></div>


                        <#if (membercart??) && (membercart?size>0)>
                            <div class="gwc" style=" margin:auto;">
                            <div class="gwc_t">全部商品${membercart?size}</div>
                            <table cellpadding="0" cellspacing="0" class="gwc_tb1">
                                <tr>
                                    <td class="tb1_td1"><input id="Checkbox1" type="checkbox"  class="allselect"/></td>
                                    <td class="tb1_td2">全选</td>
                                    <td class="tb1_td3">商品</td>
                                    <td class="tb1_td4">单价（元）</td>
                                    <td class="tb1_td5">数量</td>
                                    <td class="tb1_td6">小计（元）</td>
                                    <td class="tb1_td7">操作</td>
                                </tr>
                            </table>
                             
                                <#list membercart as cartlist>
                                <!--_index-->
                                          <!---商品加减算总数---->
                                    <script type="text/javascript">
                                        $(function () {
                                            var t = $("#text_box${cartlist_index}");
                                            $("#add${cartlist_index}").click(function () {
                                                t.val(parseInt(t.val()) + 1)                                              
                                                setTotal(); GetCount();
                                            })
                                            $("#min${cartlist_index}").click(function () {
                                                if(t.val()>0){
                                                    t.val(parseInt(t.val()) - 1)
                                                    setTotal(); GetCount();
                                                }
                                            })
                                            function setTotal() {

                                                $("#total${cartlist_index}").html((parseInt(t.val()) * ${cartlist.price}).toFixed(2));
                                               $("#newslist-"+${cartlist_index}).val("${cartlist.goodsid},"+parseInt(t.val())+","+parseInt(t.val()) * ${cartlist.price});
                                            }
                                            setTotal();
                                        })
                                    </script>
                                <table cellpadding="0" cellspacing="0" class="gwc_tb2">
                                <tr>                                    
                                    <td class="tb2_td1"><input type="checkbox" value="${cartlist.goodsid},${cartlist.needquantity},${cartlist.price}" name="newslist" id="newslist-${cartlist_index}" /></td>
                                    <td class="tb2_td2"><a href="#"><img src="${cartlist.picture}" style="width:80px;height:80px;" alt=""></a></td>
                                    <td class="tb2_td3"><a href="#">${cartlist.goodsname}</a></td>
                                    <td class="tb1_td4">￥${cartlist.price}</td>
                                    <td class="tb1_td5">
                                        <input id="min${cartlist_index}" name=""  style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="-" />
                                        <input id="text_box${cartlist_index}" name="" disabled="disabled" type="text" value="${cartlist.needquantity}" style=" width:30px; text-align:center; border:1px solid #ccc;" />
                                        <input id="add${cartlist_index}" name="" style=" width:20px; height:18px;border:1px solid #ccc;" type="button" value="+" />
                                    </td>
                                    <td class="tb1_td6"><label id="total${cartlist_index}" class="tot" style="color:#ff5500;font-size:14px; font-weight:bold;"></label></td>
                                    <td class="tb1_td7"><a href="javascript:deleteCartById('${basepath}','${cartlist.id}');">删除</a></td>
                                </tr>
                            </table>
                                </#list>
                             </#if>                           


                            <table cellpadding="0" cellspacing="0" class="gwc_tb3">
                                <tr>
                                    <td class="tb1_td1">&nbsp;</td>
                                    <td class="tb1_td1">&nbsp;</td>
                                    <td class="tb3_td1">&nbsp;</td>
                                    <td class="tb3_td2">已选商品 <label id="shuliang" style="color:#ff5500;font-size:14px; font-weight:bold;">0</label> 件</td>
                                    <td class="tb3_td3">合计(不含运费):<span>￥</span><span style=" color:#ff5500;"><label id="zong1" style="color:#ff5500;font-size:18px; font-weight:bold;"></label></span></td>
                                    <td class="tb3_td4"><span id="jz1">结算</span><a href="javascript:subminOrder('${basepath}');" style=" display:none;"  class="jz2" id="jz2">结算</a></td>
                                </tr>
                            </table>

                            </div>
                    </div>                    
              </div>
        </div>
        </div>
        </div>
        <#include "/WEB-INF/theme/default/shop/footer.ftl">
        </div>
<script src="${basepath}/ui/assets/js/tab.js"></script>
<script src="${basepath}/ui/assets/js/Calculation.js"></script>
<script src="${basepath}/ui/js/mycart.js"></script>
</body>